package lhy.autoparts.pojo;

import lhy.frontend.annotation.EntityComment;
import lhy.orm.Serializer;
import lhy.orm.annotation.Column;
import lhy.lhyorm.field.DatabaseField;
import lhy.lhyorm.table.DatabaseTable;

import java.io.Serializable;

@DatabaseTable(tableName = "UserRole")
@EntityComment("用户角色")
public class UserRole implements Serializable {
    @Column("角色编号")
    @DatabaseField(generatedId =true)
    public int id;
    @Column("角色名称")
    @DatabaseField public String  name;
    @Column("备注")
    @DatabaseField(canBeNull=true) public String  comment;

    public UserRole() {
    }

    public UserRole(int id, String name, String comment) {
        this.id = id;
        this.name = name;
        this.comment = comment;
    }

    @Override
    public String toString() {
        return Serializer.doSerialize(this);
    }
}
